// vite.config.ts
import { defineConfig, loadEnv } from "file:///C:/Users/86182/Desktop/study/vue3/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/vue3_admin_template/vue3_admin_template/node_modules/.pnpm/registry.npmmirror.com+vite@4.2.0_@types+node@18.16.3_sass@1.61.0/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Users/86182/Desktop/study/vue3/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/vue3_admin_template/vue3_admin_template/node_modules/.pnpm/registry.npmmirror.com+@vitejs+plugin-vue@4.1.0_vite@4.2.0_vue@3.2.47/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import path from "path";
import { createSvgIconsPlugin } from "file:///C:/Users/86182/Desktop/study/vue3/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/vue3_admin_template/vue3_admin_template/node_modules/.pnpm/registry.npmmirror.com+vite-plugin-svg-icons@2.0.1_vite@4.2.0/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import { viteMockServe } from "file:///C:/Users/86182/Desktop/study/vue3/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/vue3_admin_template/vue3_admin_template/node_modules/.pnpm/registry.npmmirror.com+vite-plugin-mock@2.9.6_mockjs@1.1.0_rollup@2.79.1_vite@4.2.0/node_modules/vite-plugin-mock/dist/index.js";
var vite_config_default = defineConfig(({ command, mode }) => {
  let env = loadEnv(mode, process.cwd());
  return {
    publicPath: "https://gitee.com/jch1011/guiguzhenxuan",
    plugins: [
      vue(),
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        symbolId: "icon-[dir]-[name]"
      }),
      viteMockServe({
        localEnabled: command === "serve"
        //保证开发阶段可以使用mock接口
      })
    ],
    resolve: {
      alias: {
        "@": path.resolve("./src")
        // 相对路径别名配置，使用 @ 代替 src
      }
    },
    //scss全局变量一个配置
    css: {
      preprocessorOptions: {
        scss: {
          javascriptEnabled: true,
          additionalData: '@import "./src/styles/variable.scss";'
        }
      }
    },
    //代理跨域
    server: {
      port: 5050,
      proxy: {
        [env.VITE_APP_BASE_API]: {
          //获取数据的服务器地址设置
          target: env.VITE_SERVE,
          //需要代理跨域
          changeOrigin: true,
          //路径重写
          rewrite: (path2) => path2.replace(/^\/api/, "")
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFw4NjE4MlxcXFxEZXNrdG9wXFxcXHN0dWR5XFxcXHZ1ZTNcXFxcXHU3ODQ1XHU4QzM3XHU3NTA0XHU5MDA5XFxcXHZ1ZTNfYWRtaW5fdGVtcGxhdGVcXFxcdnVlM19hZG1pbl90ZW1wbGF0ZVwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiQzpcXFxcVXNlcnNcXFxcODYxODJcXFxcRGVza3RvcFxcXFxzdHVkeVxcXFx2dWUzXFxcXFx1Nzg0NVx1OEMzN1x1NzUwNFx1OTAwOVxcXFx2dWUzX2FkbWluX3RlbXBsYXRlXFxcXHZ1ZTNfYWRtaW5fdGVtcGxhdGVcXFxcdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0M6L1VzZXJzLzg2MTgyL0Rlc2t0b3Avc3R1ZHkvdnVlMy8lRTclQTElODUlRTglQjAlQjclRTclOTQlODQlRTklODAlODkvdnVlM19hZG1pbl90ZW1wbGF0ZS92dWUzX2FkbWluX3RlbXBsYXRlL3ZpdGUuY29uZmlnLnRzXCI7Ly8gaHR0cHM6Ly92aXRlanMuZGV2L2NvbmZpZy9cclxua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